package cn.seecoder.courselearning.controller.test;

import cn.seecoder.courselearning.service.test.SubmitService;
import cn.seecoder.courselearning.vo.ResultVO;
import cn.seecoder.courselearning.vo.test.SubmitVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/submit")
public class SubmitController {

    @Resource
    private SubmitService submitService;

    /**
     * 学生提交测试（一次测试重复多次创建）
     * @param submitVO
     * @return
     */
    @PostMapping("/create")
    ResultVO<SubmitVO> createSubmit(@RequestBody SubmitVO submitVO){
        return submitService.createSubmit(submitVO);
    }
}
